<link href="css/style_question.css" type="text/css" rel="stylesheet" />
<?php
include_once('connection/connection.php');
include('config.php');
//$form_id=$_SESSION['formID'];
$form_id=trim($_REQUEST['form_id']);
$sqlAsset="select * from tbl_dtls_q1_asset where loc_id=".$form_id." AND asset_id LIKE ('centi%')";
//echo $sqlSWS;
$queryAsset=mysql_query($sqlAsset);
//$rowSWS=mysql_fetch_array($querySWS);
?> 
	<table border="0" width="630" id="table16" cellpadding="0">
        <tr>
			<td width="15%" bgcolor="#CCCCCC"></td>
			<td width="27%" align="center" height="16" bgcolor="#CCCCCC"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Status</font></td>
			<td width="19%" align="center" height="16" bgcolor="#CCCCCC"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Discharge (lpm)</font></td>
            <td width="18%" align="center" height="16" bgcolor="#CCCCCC"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Head (m)</font></td>
            <td width="21%" align="center" height="16" bgcolor="#CCCCCC"><font style="font-size: 8.5pt" face="Verdana" color="#000000"> Power Rating (in HP)</font></td>
		</tr>
		<?php
			//$centi_total=$_POST['centi_total'];
			//for($i=1; $i<=$centi_total; $i++)
			//{
  			$i=1;
			while($rowAsset=mysql_fetch_array($queryAsset))
			{
		?>
		<tr align="center">
			<td><input type="text" name="centi_id<?php echo $i;?>" id="centi_id<?php echo $i;?>" size="18" class="txt5" value="<?php echo $rowAsset['asset_id'];?>" readonly /></td>
			<td width="28%"><font color="#000000" size="2">
      <input type="radio" name="centi_status<?php echo $i;?>"id="centi_status<?php echo $i;?>" value="operational" <?php echo($rowAsset['asset_status']=='operational')?'checked':'';?> onclick="setEnable211(this.value,<?php echo $i;?>)" />
      Operatioanl
      <input type="radio" name="centi_status<?php echo $i;?>"id="centi_status<?php echo $i;?>" value="standby" <?php echo  ($rowAsset['asset_status']=='standby')?'checked':'';?> onclick="setReadOnly211(this.value,<?php echo $i;?>)" />
      Standby </font> </td>
	  <?php if($rowAsset['asset_status']=='standby') { ?> 
		  <td width="18%"><input type="text" name="centi_discharge<?php echo $i;?>" id="centi_discharge<?php echo $i;?>" value="<?php echo $rowAsset['asset_discharge'];?>" size="18" class="txt5" onblur="float(this)" disabled/></td>
    <td width="17%"><input type="text" name="centi_head<?php echo $i;?>" id="centi_head<?php echo $i;?>" value="<?php echo $rowAsset['asset_head'];?>" size="18" class="txt5" onblur="float(this)" disabled/></td>
    <td width="23%"><input type="text" name="centi_power<?php echo $i;?>" id="centi_power<?php echo $i;?>" value="<?php echo $rowAsset['asset_power'];?>" size="18" class="txt5" onblur="float(this)" disabled/></td>
	<?php }
		else {
	?>
	<td width="18%"><input type="text" name="centi_discharge<?php echo $i;?>" id="centi_discharge<?php echo $i;?>" value="<?php echo $rowAsset['asset_discharge'];?>" size="18" class="txt5" onblur="float(this)" /></td>
    <td width="17%"><input type="text" name="centi_head<?php echo $i;?>" id="centi_head<?php echo $i;?>" value="<?php echo $rowAsset['asset_head'];?>" size="18" class="txt5" onblur="float(this)" /></td>
    <td width="23%"><input type="text" name="centi_power<?php echo $i;?>" id="centi_power<?php echo $i;?>" value="<?php echo $rowAsset['asset_power'];?>" size="18" class="txt5" onblur="float(this)" /></td>
  </tr>
  <?php } ?>
  <tr>
    <td height="2" colspan="5" align="center" bgcolor="#CCCCCC"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000"></font></td>
  </tr>
  <?php $i++;
		} 
	?>	
<input type="hidden" name="centicount" id="centicount" value="<?php echo $centi_total;?>" />					
</table>

